import request from "@/request/ajax.js";
let ztpmPmsys =
  import.meta.env.VITE_API_URL +
  import.meta.env.VITE_API_ALIAS +
  import.meta.env.VITE_API_ZTPMSYS;

// 获取词典分页
export const apiGetDictionaryPage = (params, msg) => {
  return request.get(ztpmPmsys + "/codeDict/page", params, msg);
};
// 添加代码词典
export const apiPostCreateCodeDictionary = (data, msg) => {
  return request.post(ztpmPmsys + "/codeDict/create", data, msg);
};
// 修改代码词典
export const apiPutUpdateCodeDictionary = (data, msg) => {
  return request.put(ztpmPmsys + "/codeDict/update", data, msg);
};
// 删除代码词典
export const apiDeleteCodeDictionary = (param, msg) => {
  return request.delete(ztpmPmsys + "/codeDict/delete", param, msg);
};
// 获取代码词典词条
export const apiGetCodeDictionaryItemPage = (params, msg) => {
  return request.get(ztpmPmsys + "/codeDict/item/page", params, msg);
};
// 添加代码词典词条
export const apiPostCreateCodeDictionaryItem = (data, msg) => {
  return request.post(ztpmPmsys + "/codeDict/item/create", data, msg);
};
// 修改代码词典词条
export const apiPutUpdateCodeDictionaryItem = (data, msg) => {
  return request.put(ztpmPmsys + "/codeDict/item/update", data, msg);
};
// 删除代码词典词条
export const apiDeleteCodeDictionaryItem = (param, msg) => {
  return request.delete(ztpmPmsys + "/codeDict/item/delete", param, msg);
};
